﻿using System.ServiceModel;
using System.ServiceModel.Web;
using System.ServiceModel.Syndication;

namespace Stimulus360.Services.Interfaces
{
    // NOTE: If you change the interface name "IFeedService" here, you must also update the reference to "IFeedService" in Web.config.
    [ServiceContract]
    [ServiceKnownType(typeof(Atom10FeedFormatter))]
    [ServiceKnownType(typeof(Rss20FeedFormatter))]
    public interface IFeedsService
    {
        /// <summary>
        ///     Method to get a feed of new Ideas
        /// </summary>
        /// <param name="format">
        ///     Feed format
        /// </param>
        /// <returns>
        ///     Feed of new ideas
        /// </returns>
        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2243:AttributeStringLiteralsShouldParseCorrectly",Justification=" Format needed for WebGet attribute"), OperationContract]
        [WebGet(UriTemplate = "/NewIdeas/?format={format}")]
        SyndicationFeedFormatter NewIdeas(string format);

        /// <summary>
        ///     Method to get a feed of most popular Ideas
        /// </summary>
        /// <param name="format">
        ///     Feed format
        /// </param>
        /// <returns>
        ///     Feed of most popular ideas
        /// </returns>
        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2243:AttributeStringLiteralsShouldParseCorrectly",Justification=" Format needed for WebGet attribute"), OperationContract]
        [WebGet(UriTemplate = "/MostPopularIdeas/?format={format}")]
        SyndicationFeedFormatter MostPopularIdeas(string format);
        
        /// <summary>
        ///     Method to get a feed of most popular projects
        /// </summary>
        /// <param name="format">
        ///     Feed format
        /// </param>
        /// <returns>
        ///     Feed of most popular projects
        /// </returns>
        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2243:AttributeStringLiteralsShouldParseCorrectly",Justification=" Format needed for WebGet attribute"), OperationContract]
        [WebGet(UriTemplate = "/MostPopularProjects/?format={format}")]
        SyndicationFeedFormatter MostPopularProjects(string format);

        /// <summary>
        ///     Method to get a feed of new Projects
        /// </summary>
        /// <param name="format">
        ///     Feed format
        /// </param>
        /// <returns>
        ///     Feed of new projects
        /// </returns>
        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2243:AttributeStringLiteralsShouldParseCorrectly",Justification=" Format needed for WebGet attribute"), OperationContract]
        [WebGet(UriTemplate = "/NewProjects/?format={format}")]
        SyndicationFeedFormatter NewProjects(string format);
    }
}
